﻿<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <title>优惠券</title>
    <link rel="stylesheet" href="../components/lib/bootstrap.min.css" />
    <link rel="stylesheet" href="../components/lib/toastr.min.css" />
    <link rel="stylesheet" href="../components/lib/fontawesome/css/font-awesome.min.css" />
    <link rel="stylesheet" href="../components/lib/style.css" />

    <link rel="stylesheet" type="text/css" href="styles/style.css" />
</head>
<body>

    <div id="loading" class="loading"><img src="../components/images/loading.gif"></div>
    <div id="main" style="display:none">
        <script class="controller" type="text/html">
            <div class="coupon_header">
                <img src="<%=data.imageUrl%>" class="head_img">
            </div>
            <div class="ggk_content">
                <%if (data.awardCode){%>
                <div class="ggk_content ggk_content_dj">
                    <ul>
                        <li class="gift_item">
                            <div class="hd">
                                <h2 class="title">活动方兑奖</h2>
                            </div>
                            <div class="bd clearfix">
                                <%if (data.status == 'Cash'){%>
                                <p class="time">
                                    恭喜，您已兑奖成功！本兑奖码将自动作废。
                                </p>
                                <%}else{%>
                                <form data-toggle="validator" role="form">
                                    <div class="form-group">
                                        <input type="hidden" value="对不起，您输入的兑奖密码不正确，请重新输入！" id="hideErrorMessage" />
                                        <input type="text" id="awardCode" class="form-control" placeholder="活动方输入兑奖密码" data-error="请填写兑奖密码" value="" required>
                                        <div class="help-block with-errors"></div>
                                    </div>
                                    <div class="app-center"><button type="button" onclick="submitAwardCode()" id="btnSubmitAwardCode" class="btn btn-block btn-success btn-lg">活动方提交</button></div>
                                </form>
                                <%}%>
                            </div>
                        </li>
                    </ul>
                </div>
                <%}%>
                <ul>
                    <li class="coupon_item">
                        <div class="hd">
                            <h2 class="title"><%=data.title%></h2>
                        </div>
                        <div class="bd">
                            <p class="p1">
                                <span class="c666">SN码：</span>
                                <br />
                                <strong><%=data.sn%></strong>
                            </p>
                            <p><span class="c666">中奖时间：</span><%=data.holdDate%></p>
                        </div>
                    </li>

                    <li class="gift_item">
                        <div class="hd">
                            <h2 class="title">优惠券设置</h2>
                        </div>
                        <div class="bd">
                            <p>
                                <%for (var i = 0; i < data.couponList.length; i++) {
                                var coupon = data.couponList[i];
                                %>
                                优惠券名称：<%=coupon.title%> 数量：<%=coupon.totalNum%>
                                <br />
                                <%}%>
                            </p>
                        </div>
                    </li>
                    <li class="rule_item">
                        <div class="hd">
                            <h2 class="title">使用说明</h2>
                        </div>
                        <div class="bd">
                            <p><%==data.usage%></p>
                        </div>
                    </li>
                    <li class="rule_item">
                        <div class="hd">
                            <h2 class="title">活动说明</h2>
                        </div>
                        <div class="bd">
                            <p><%==data.description%></p>
                        </div>
                    </li>
                </ul>
            </div>

            <%if (!isPoweredBy){%>
            <div class="footer">
                <p>技术支持：阁下 <a href="http://www.gexia.com" target="_blank">GEXIA.COM</a></p>
            </div>
            <%}else if(poweredBy){%>
            <div class="footer">
                <p><%==poweredBy%></p>
            </div>
            <%}%>

        </script>
    </div>

</body>
</html>

<script src="../components/lib/jquery-1.11.0.min.js"></script>
<script src="../components/lib/bootstrap.min.js"></script>
<script src="../components/lib/json2.js"></script>
<script src="../components/lib/template.js"></script>
<script src="../components/lib/toastr.min.js"></script>
<script src="../components/lib/notifyService.js"></script>
<script src="../components/lib/utilService.js"></script>

<script src="scripts/service.js"></script>
<script src="scripts/controller.js"></script>